package LeetCode;

public class LC275 {
    public static void main(String[] args) {


    }
    public int hIndex(int[] citations) {
        int ans = 0;
        for (int i = 0; i < citations.length; i++) {
            int citation = citations[i];
            if(citations.length - i>= citation){
                ans = citations.length - i;
            }
        }
        return  ans ;
    }
}
